/*
 * @Description:
 * @Version: 2.0
 * @Autor: Seven
 * @Date: 2023-09-25 10:41:45
 * @LastEditors: Seven
 * @LastEditTime: 2023-10-27 14:51:37
 */
import React from "react";
import { Navigate } from "react-router-dom";
import AnalyticalDecisionCenter from "@/pages/AnalyticalDecisionCenter";
import MonitoringAlarmCenter from "@/pages/MonitoringAlarmCenter";
import OperationManagementCenter from "@/pages/OperationManagementCenter";
import EmergencyManagementCenter from "@/pages/EmergencyManagementCenter";
import SafetyProtectionCenter from "@/pages/SafetyProtectionCenter";
import StatusSurveillance from "@/pages/MonitoringAlarmCenter/c-pages/StatusSurveillance";
import RouteOverview from "@/pages/MonitoringAlarmCenter/c-pages/RouteOverview";
import SystemAlarm from "@/pages/MonitoringAlarmCenter/c-pages/SystemAlarm";
import OperationMaintenance from "@/pages/MonitoringAlarmCenter/c-pages/OperationMaintenance";
import HomePage from "@/pages/AnalyticalDecisionCenter/c-pages/HomePage";
import EquipmentFailureAnalysis from "@/pages/AnalyticalDecisionCenter/c-pages/EquipmentFailureAnalysis";
import EquipmentHeathyAnalysis from "@/pages/AnalyticalDecisionCenter/c-pages/EquipmentHeathyAnalysis";
import EquipmentMaintenanceAnalysis from "@/pages/AnalyticalDecisionCenter/c-pages/EquipmentMaintenanceAnalysis";
import ComprehensiveAnalysisOfEquipment from "@/pages/AnalyticalDecisionCenter/c-pages/ComprehensiveAnalysisOfEquipment";
import WorkorderManagement from "@/pages/OperationManagementCenter/WorkorderManagement";
import RepairSchedule from "@/pages/OperationManagementCenter/RepairSchedule";
import EquipmentManagement from "@/pages/OperationManagementCenter/EquipmentManagement";
import KnowledgeBase from "@/pages/OperationManagementCenter/KnowledgeBase";
import EquipmentLedger from "@/pages/OperationManagementCenter/EquipmentManagement/s-pages/EquipmentLedger";
import EquipmentRegistration from "@/pages/OperationManagementCenter/EquipmentManagement/s-pages/EquipmentRegistration";
import WorkHand from "@/pages/OperationManagementCenter/WorkorderManagement/s-pages/WorkHand";
import WorkRepair from "@/pages/OperationManagementCenter/WorkorderManagement/s-pages/WorkRepair";
import WorkBreakdown from "@/pages/OperationManagementCenter/WorkorderManagement/s-pages/WorkBreakdown";
import AlarmStatistics from "@/pages/MonitoringAlarmCenter/c-pages/SystemAlarm/s-pages/AlarmStatistics";
import HistoryAlarm from "@/pages/MonitoringAlarmCenter/c-pages/SystemAlarm/s-pages/HistoryAlarm";
import RealTimeAlarm from "@/pages/MonitoringAlarmCenter/c-pages/SystemAlarm/s-pages/RealTimeAlarm";
import ReliabilityIndex from "@/pages/MonitoringAlarmCenter/c-pages/OperationMaintenance/s-pages/ReliabilityIndex";
import ReliabilityIndexTrend from "@/pages/MonitoringAlarmCenter/c-pages/OperationMaintenance/s-pages/ReliabilityIndexTrend";
import MaintainabilityIndex from "@/pages/MonitoringAlarmCenter/c-pages/OperationMaintenance/s-pages/MaintainabilityIndex";
import MaintainabilityIndexTrend from "@/pages/MonitoringAlarmCenter/c-pages/OperationMaintenance/s-pages/MaintainabilityIndexTrend";
import SecurityIndex from "@/pages/MonitoringAlarmCenter/c-pages/OperationMaintenance/s-pages/SecurityIndex";
import SecurityIndexTrend from "@/pages/MonitoringAlarmCenter/c-pages/OperationMaintenance/s-pages/SecurityIndexTrend";
import FaultAnalysis from "@/pages/AnalyticalDecisionCenter/c-pages/EquipmentFailureAnalysis/s-pages/FaultAnalysis";
import FailureTendency from "@/pages/AnalyticalDecisionCenter/c-pages/EquipmentFailureAnalysis/s-pages/FailureTendency";
import FaultType from "@/pages/AnalyticalDecisionCenter/c-pages/EquipmentFailureAnalysis/s-pages/FaultType";
import FaultDiagnosis from "@/pages/AnalyticalDecisionCenter/c-pages/EquipmentFailureAnalysis/s-pages/FaultDiagnosis";
import FailurePrediction from "@/pages/AnalyticalDecisionCenter/c-pages/EquipmentFailureAnalysis/s-pages/FailurePrediction";
import HealthScoreStation from "@/pages/AnalyticalDecisionCenter/c-pages/EquipmentHeathyAnalysis/s-pages/HealthScoreStation";
import HealthScore from "@/pages/AnalyticalDecisionCenter/c-pages/EquipmentHeathyAnalysis/s-pages/HealthScore";
import MaintenanceCost from "@/pages/AnalyticalDecisionCenter/c-pages/EquipmentMaintenanceAnalysis/s-pages/MaintenanceCost";
import VendorAnalysis from "@/pages/AnalyticalDecisionCenter/c-pages/EquipmentMaintenanceAnalysis/s-pages/VendorAnalysis";
import YearSchedule from "@/pages/OperationManagementCenter/RepairSchedule/s-pages/yearSchedule";
import MonthSchedule from "@/pages/OperationManagementCenter/RepairSchedule/s-pages/monthSchedule";
import WeekSchedule from "@/pages/OperationManagementCenter/RepairSchedule/s-pages/weekSchedule";
import PublicWorks from "@/pages/MonitoringAlarmCenter/c-pages/StatusSurveillance/c-pages/PublicWorks";
import PowerSupply from "@/pages/MonitoringAlarmCenter/c-pages/StatusSurveillance/c-pages/PowerSupply";
import Electromechanical from "@/pages/MonitoringAlarmCenter/c-pages/StatusSurveillance/c-pages/Electromechanical";
import CallNumber from "@/pages/MonitoringAlarmCenter/c-pages/StatusSurveillance/c-pages/CallNumber";
import Vehicle from "@/pages/MonitoringAlarmCenter/c-pages/StatusSurveillance/c-pages/Vehicle";
import DefendProtect from "@/pages/SafetyProtectionCenter/DefendProtect";
import ChildEmergency from "@/pages/EmergencyManagementCenter/s-pages/ChildEmergency";

const routes = [
  {
    path: "/",
    element: <Navigate to="/monitoring" />,
  },
  {
    path: "/monitoring",
    element: <MonitoringAlarmCenter />,
    children: [
      {
        path: "/monitoring",
        element: <Navigate to="/monitoring/route" />,
      },
      {
        path: "/monitoring/route",
        element: <RouteOverview />,
      },
      {
        path: "/monitoring/status",
        element: <StatusSurveillance />,
        children: [
          {
            path: "/monitoring/status",
            element: <Navigate to="/monitoring/status/public" />,
          },
          {
            path: "/monitoring/status/public",
            element: <PublicWorks />,
          },
          {
            path: "/monitoring/status/power",
            element: <PowerSupply />,
          },
          {
            path: "/monitoring/status/electromechanical",
            element: <Electromechanical />,
          },
          {
            path: "/monitoring/status/call",
            element: <CallNumber />,
          },
          {
            path: "/monitoring/status/vehicle",
            element: <Vehicle />,
          },
        ],
      },
      {
        path: "/monitoring/alarm",
        element: <SystemAlarm />,
        children: [
          {
            path: "/monitoring/alarm",
            element: <Navigate to="/monitoring/alarm/statistics" />,
          },
          {
            path: "/monitoring/alarm/statistics",
            element: <AlarmStatistics />,
          },
          {
            path: "/monitoring/alarm/history",
            element: <HistoryAlarm />,
          },
          {
            path: "/monitoring/alarm/real",
            element: <RealTimeAlarm />,
          },
        ],
      },
      {
        path: "/monitoring/operation",
        element: <OperationMaintenance />,
        children: [
          {
            path: "/monitoring/operation",
            element: <Navigate to="/monitoring/operation/reliability" />,
          },
          {
            path: "/monitoring/operation/reliability",
            element: <ReliabilityIndex />,
          },
          {
            path: "/monitoring/operation/reliabilitytrend",
            element: <ReliabilityIndexTrend />,
          },
          {
            path: "/monitoring/operation/maintainability",
            element: <MaintainabilityIndex />,
          },
          {
            path: "/monitoring/operation/maintainabilitytrend",
            element: <MaintainabilityIndexTrend />,
          },
          {
            path: "/monitoring/operation/security",
            element: <SecurityIndex />,
          },
          {
            path: "/monitoring/operation/securitytrend",
            element: <SecurityIndexTrend />,
          },
        ],
      },
    ],
  },
  {
    path: "/analyse",
    element: <AnalyticalDecisionCenter />,
    children: [
      {
        path: "/analyse",
        element: <Navigate to="/analyse/home" />,
      },
      {
        path: "/analyse/home",
        element: <HomePage />,
      },
      {
        path: "/analyse/failure",
        element: <EquipmentFailureAnalysis />,
        children: [
          {
            path: "/analyse/failure",
            element: <Navigate to="/analyse/failure/analysis" />,
          },
          {
            path: "/analyse/failure/analysis",
            element: <FaultAnalysis />,
          },
          {
            path: "/analyse/failure/trendency",
            element: <FailureTendency />,
          },
          {
            path: "/analyse/failure/type",
            element: <FaultType />,
          },
          {
            path: "/analyse/failure/diagnoosis",
            element: <FaultDiagnosis />,
          },
          {
            path: "/analyse/failure/prediction",
            element: <FailurePrediction />,
          },
        ],
      },
      {
        path: "/analyse/heathy",
        element: <EquipmentHeathyAnalysis />,
        children: [
          {
            path: "/analyse/heathy",
            element: <Navigate to="/analyse/heathy/score" />,
          },
          {
            path: "/analyse/heathy/score",
            element: <HealthScore />,
          },
          {
            path: "/analyse/heathy/station",
            element: <HealthScoreStation />,
          },
        ],
      },
      {
        path: "/analyse/maintence",
        element: <EquipmentMaintenanceAnalysis />,
        children: [
          {
            path: "/analyse/maintence",
            element: <Navigate to="/analyse/maintence/cost" />,
          },
          {
            path: "/analyse/maintence/cost",
            element: <MaintenanceCost />,
          },
          {
            path: "/analyse/maintence/vendor",
            element: <VendorAnalysis />,
          },
        ],
      },
      {
        path: "/analyse/comprehensive",
        element: <ComprehensiveAnalysisOfEquipment />,
      },
    ],
  },
  {
    path: "/operation",
    element: <OperationManagementCenter />,
    children: [
      {
        path: "/operation",
        element: <Navigate to="/operation/work" />,
      },
      {
        path: "/operation/work",
        element: <WorkorderManagement />,
        children: [
          {
            path: "/operation/work",
            element: <Navigate to="/operation/work/hand" />,
          },
          {
            path: "/operation/work/hand",
            element: <WorkHand />,
          },
          {
            path: "/operation/work/repair",
            element: <WorkRepair />,
          },
          {
            path: "/operation/work/break",
            element: <WorkBreakdown />,
          },
        ],
      },
      {
        path: "/operation/repair",
        element: <RepairSchedule />,
        children: [
          {
            path: "/operation/repair",
            element: <Navigate to="/operation/repair/year" />,
          },
          {
            path: "/operation/repair/year",
            element: <YearSchedule />,
          },
          {
            path: "/operation/repair/month",
            element: <MonthSchedule />,
          },
          {
            path: "/operation/repair/week",
            element: <WeekSchedule />,
          },
        ],
      },
      {
        path: "/operation/equip",
        element: <EquipmentManagement />,
        children: [
          {
            path: "/operation/equip",
            element: <Navigate to="/operation/equip/ledger" />,
          },
          {
            path: "/operation/equip/ledger",
            element: <EquipmentLedger />,
          },
          {
            path: "/operation/equip/regist",
            element: <EquipmentRegistration />,
          },
        ],
      },
      {
        path: "/operation/know",
        element: <KnowledgeBase />,
      },
    ],
  },
  {
    path: "/emergency",
    element: <EmergencyManagementCenter />,
    children: [
      {
        path: "/emergency",
        element: <Navigate to="/emergency/center" />,
      },
      {
        path: "/emergency/center",
        element: <ChildEmergency />,
      },
    ],
  },
  {
    path: "/safety",
    element: <SafetyProtectionCenter />,
    children: [
      {
        path: "/safety",
        element: <Navigate to="/safety/defend" />,
      },
      {
        path: "/safety/defend",
        element: <DefendProtect />,
      },
    ],
  },
];

export default routes;
